import {Page} from '@/base/Page';
import {Account} from '@/base/model/Account';
import {getAccountList} from '@/base/api/AccountApi';

export class AccountNumBloc {
  loading = false;
  paged: Page<Account> = new Page<Account>([], 0, 1, 15, 0, []);

  load(pageIndex: number, pageSize: number, id: number) {
    return getAccountList({
      pageIndex,
      pageSize
    }).then((res) => {
      this.paged = res.data;
    }).finally(() => {
      this.loading = false;
    });
  }
}
